Skip to content

Override Formula.cancel() and .wait() rather than .stop()#1375

Merged
simonvoelcker merged 2 commits intofrequenz-floss:v1.x.xfrom
simonvoelcker:formula_cancel_and_wait
Mar 17, 2026
Merged

Override Formula.cancel() and .wait() rather than .stop()#1375
simonvoelcker merged 2 commits intofrequenz-floss:v1.x.xfrom
simonvoelcker:formula_cancel_and_wait

Conversation

@simonvoelcker
Copy link
Copy Markdown
Contributor

Addresses #1327.

Before this change, stopping a Formula would not stop the evaluator or any sub-formulas. The BackgroundService base class calls cancel() and wait(), but these must be overridden correctly to also cancel/await the evaluator and sub-formulas.

@github-actions github-actions bot added the part:data-pipeline Affects the data pipeline label Mar 16, 2026
@simonvoelcker simonvoelcker added type:bug Something isn't working and removed part:data-pipeline Affects the data pipeline labels Mar 16, 2026
@simonvoelcker simonvoelcker self-assigned this Mar 16, 2026
@github-actions github-actions bot added part:docs Affects the documentation part:data-pipeline Affects the data pipeline labels Mar 16, 2026
@simonvoelcker simonvoelcker marked this pull request as ready for review March 16, 2026 13:34
@simonvoelcker simonvoelcker requested a review from a team as a code owner March 16, 2026 13:34
@simonvoelcker simonvoelcker requested review from daniel-zullo-frequenz and removed request for a team March 16, 2026 13:34
@simonvoelcker simonvoelcker force-pushed the formula_cancel_and_wait branch from 091f48d to 4def8e9 Compare March 17, 2026 09:37
Signed-off-by: Simon Völcker <simon.voelcker@frequenz.com>
Signed-off-by: Simon Völcker <simon.voelcker@frequenz.com>
@simonvoelcker simonvoelcker force-pushed the formula_cancel_and_wait branch from 4def8e9 to 5121835 Compare March 17, 2026 09:41
@simonvoelcker simonvoelcker enabled auto-merge March 17, 2026 09:59
@simonvoelcker simonvoelcker added this pull request to the merge queue Mar 17, 2026
@github-project-automation github-project-automation bot moved this from To do to Review approved in Python SDK Roadmap Mar 17, 2026
Merged via the queue into frequenz-floss:v1.x.x with commit b107813 Mar 17, 2026
6 checks passed
@simonvoelcker simonvoelcker deleted the formula_cancel_and_wait branch March 17, 2026 10:08
@github-project-automation github-project-automation bot moved this from Review approved to Done in Python SDK Roadmap Mar 17, 2026
@llucax llucax added this to the v1.0.0-rc2205 milestone Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:data-pipeline Affects the data pipeline part:docs Affects the documentation type:bug Something isn't working

Projects

Development

Successfully merging this pull request may close these issues.

2 participants